export function parseQueryString(url) {
    var queryString = {}
    var str = url
    let idx = url.indexOf('?')
    if (idx != -1) {
        str = url.substr(idx + 1)
    }
    let kev = str.split('&')
    kev.forEach((x, i) => {
        let kv = x.split('=')
        queryString[kv[0]] = kv[1]
    })
    return queryString
}

var isMobile = function () {
    return cc.sys.isMobile;
};

module.exports = {
    parseQueryString: parseQueryString,
    isMobile: isMobile
};
